package com.tiancheng.trade.commom.web.auth;

import com.tiancheng.admintoken.config.AuthTokenConfig;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 开放接口授权配置
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "auth-token-config")
@ConditionalOnMissingBean
public class OpenAuthTokenConfig {

    /**
     * 平台端配置
     */
    private TokenConfig openApiTokenConfig;


    @Data
    public static class TokenConfig {

        private String tokenName;

        private Integer timeout=604800;

        private String tokenStyle="uuid";

        private Boolean isConcurrent;

        private Boolean isShare;

        private String jwtSecretKey;

        private String tokenPrefix;
    }

}
